Skip to content

Use TypeVar refresh uniformly for class object access#15945

Merged
ilevkivskyi merged 1 commit intopython:masterfrom
ilevkivskyi:fix-self-class-access
Aug 24, 2023
Merged

Use TypeVar refresh uniformly for class object access#15945
ilevkivskyi merged 1 commit intopython:masterfrom
ilevkivskyi:fix-self-class-access

Conversation

@ilevkivskyi
Copy link
Copy Markdown
Member

Fixes #15934

I think this is a right thing to do, it may even fix some other rare accidental TypeVar clashes not involving self-types. This causes a bit of churn in tests, but not too much.

@github-actions
Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@ilevkivskyi ilevkivskyi merged commit 9e1f4df into python:master Aug 24, 2023
@ilevkivskyi ilevkivskyi deleted the fix-self-class-access branch August 24, 2023 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

My 1.5.1 gets confused when a class variable references a method from another class that returns Self.

2 participants